package com.success.application.shop.holder;


import android.graphics.drawable.Drawable;
import android.os.AsyncTask;
import android.os.Environment;
import android.text.Html;
import android.text.method.ScrollingMovementMethod;
import android.util.Log;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.bumptech.glide.Glide;
import com.success.application.base.BaseHolder;
import com.success.application.myapplication.R;
import com.success.application.shop.bean.HuoDong;
import com.success.application.shop.bean.Job;

import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.HttpURLConnection;
import java.net.URL;

import butterknife.Bind;

/**
 * Created by ChrisWong on 2017/1/17.
 */

public class JobHolder extends BaseHolder<Job> {
    private Job mjob;
    @Bind(R.id.iv_consult_face)
    ImageView iv_consult_face;
    @Bind(R.id.tv_activity_title)
    TextView tv_activity_title;
    @Bind(R.id.tv_content)
    TextView tv_content;
    @Bind(R.id.tv_activity_time)
    TextView tv_dianhua;//电话
    @Bind(R.id.tv_address)
    TextView tv_renshu;//人数
    public JobHolder(View itemView) {
        super(itemView);
    }

    @Override
    public void bindItem(Job job) {
        mjob = job;
        Glide.with(iv_consult_face.getContext()).load(mjob.getJzxx_jztb()).into(iv_consult_face);
        tv_activity_title.setText(mjob.getJzxx_zt());
        tv_dianhua.setText(mjob.getJzxx_lxdh());
        tv_renshu.setText(mjob.getJzxx_zprs());
        //活动备注==活动详情 html的文本转换
        tv_content.setText(mjob.getJzxx_bz());
        //设置文本信息
    }
    @Override
    public void onClick(View v) {
//        TestDetailActivity.show(v.getContext(), mConsult);
    }

    @Override
    public boolean onLongClick(View v) {
//        Toast.makeText(v.getContext(),
//                mConsult.getNc()+ "长按事件触发！", Toast.LENGTH_SHORT)
//                .show();
        return true;
    }
}
